﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL
{
    /// <summary>
    /// 新闻类别
    /// </summary>
    public class NewsColumn
    {
        public NewsColumn()
        { }
        DAL.NewsColumn dal = new DAL.NewsColumn();
        /// <summary>
        /// 新闻类别 添加
        /// </summary>
        /// <param name="model">新闻类别实体</param>
        /// <returns>是否执行成功</returns>
        public bool NewsColumnAdd(MODEL.NewsColumn model)
        {
            return dal.NewsColumnAdd(model);
        }
        /// <summary>
        /// 新闻类别 删除
        /// </summary>
        /// <param name="columnId">类别编号</param>
        /// <returns>是否执行成功</returns>
        public bool NewsColumnDel(int columnId)
        {
            return dal.NewsColumnDel(columnId);
        }
        /// <summary>
        /// 新闻类别 修改
        /// </summary>
        /// <param name="model">新闻类别实体</param>
        /// <returns>是否执行成功</returns>
        public bool NewsColumnUpdate(MODEL.NewsColumn model)
        {
            return dal.NewsColumnUpdate(model);
        }
        /// <summary>
        /// 新闻类别 列表
        /// </summary>
        /// <returns>列表</returns>
        public DataSet GetNewsColumnList()
        {
            return dal.GetNewsColumnList();
        }
        /// <summary>
        /// 新闻类别 实体
        /// </summary>
        /// <param name="columnId">类别编号</param>
        /// <returns>实体</returns>
        public MODEL.NewsColumn GetNewsColumnModel(int columnId)
        {
            return dal.GetNewsColumnModel(columnId);
        }
    }
    /// <summary>
    /// 新闻信息
    /// </summary>
    public class NewsInformation
    {
        public NewsInformation()
        { }
        DAL.NewsInformation dal = new DAL.NewsInformation();
        /// <summary>
        /// 新闻信息 添加
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool NewsInformationAdd(MODEL.NewsInformation model)
        {
            return dal.NewsInformationAdd(model);
        }
        /// <summary>
        /// 新闻信息 删除
        /// </summary>
        /// <param name="newsId">新闻编号</param>
        /// <returns>是否执行成功</returns>
        public bool NewsInformationDel(string newsId)
        {
            return dal.NewsInformationDel(newsId);
        }
        /// <summary>
        /// 新闻信息 修改
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool NewsInformationUpdate(MODEL.NewsInformation model)
        {
            return dal.NewsInformationUpdate(model);
        }
        /// <summary>
        /// 新闻信息 修改是否热点
        /// </summary>
        /// <param name="newId">新闻编号</param>
        /// <param name="isHot">是否热点</param>
        /// <returns>是否执行成功</returns>
        public bool NewsInformationUpdateIshot(string newId, bool isHot)
        {
            return dal.NewsInformationUpdateIshot(newId, isHot);
        }
        /// <summary>
        /// 新闻信息 修改是否置顶
        /// </summary>
        /// <param name="newId">新闻编号</param>
        /// <param name="isTop">是否置顶</param>
        /// <returns>是否执行成功</returns>
        public bool NewsInformationUpdateIstop(string newId, bool isTop)
        {
            return dal.NewsInformationUpdateIsimg(newId, isTop);
        }
        /// <summary>
        /// 新闻信息 修改新闻类别
        /// </summary>
        /// <param name="newId">新闻编号</param>
        /// <param name="classId">类别编号</param>
        /// <returns>是否执行成功</returns>
        public bool NewsInformationUpdateClassid(string newId, int classId)
        {
            return dal.NewsInformationUpdateClassid(newId, classId);
        }
        /// <summary>
        /// 新闻信息 修改新闻标题
        /// </summary>
        /// <param name="newId">新闻编号</param>
        /// <param name="newTitle">新闻标题</param>
        /// <returns>是否执行成功</returns>
        public bool NewsInformationUpdateTitle(string newId, string newTitle)
        {
            return dal.NewsInformationUpdateTitle(newId, newTitle);
        }
        /// <summary>
        /// 新闻信息 点击量+1
        /// </summary>
        /// <param name="newsId">新闻编号</param>
        public void NewsClickNumAdd(string newsId)
        {
            dal.NewsClickNumAdd(newsId);
        }
        /// <summary>
        /// 新闻信息 列表
        /// </summary>
        /// <returns>列表</returns>
        public DataSet GetNewsInformationList()
        {
            return dal.GetNewsInformationList();
        }
        /// <summary>
        /// 新闻信息 列表
        /// </summary>
        /// <param name="columnId">新闻编号</param>
        /// <returns>列表</returns>
        public DataSet GetNewsInformationList(int columnId)
        {
            return dal.GetNewsInformationList(columnId);
        }
        /// <summary>
        /// 新闻信息 列表
        /// </summary>
        /// <param name="timeYear">年</param>
        /// <returns>列表</returns>
        public DataSet GetNewsInformationList(string timeYear)
        {
            return dal.GetNewsInformationList(timeYear);
        }
        /// <summary>
        /// 新闻信息 列表
        /// </summary>
        /// <param name="timeYear">年</param>
        /// <param name="timeMonth">月</param>
        /// <returns>列表</returns>
        public DataSet GetNewsInformationList(string timeYear, string timeMonth)
        {
            return dal.GetNewsInformationList(timeYear, timeMonth);
        }
        /// <summary>
        /// 新闻信息 列表
        /// </summary>
        /// <param name="timeYear">年</param>
        /// <param name="timeMonth">月</param>
        /// <param name="timeDay">日</param>
        /// <returns>列表</returns>
        public DataSet GetNewsInformationList(string timeYear, string timeMonth, string timeDay)
        {
            return dal.GetNewsInformationList(timeYear, timeMonth, timeDay);
        }
        /// <summary>
        /// 新闻信息 实体
        /// </summary>
        /// <param name="newsId">新闻编号</param>
        /// <returns>实体</returns>
        public MODEL.NewsInformation GetNewsInformationModel(string newsId)
        {
            return dal.GetNewsInformationModel(newsId);
        }
        /// <summary>
        /// 新闻实体 编号
        /// </summary>
        /// <returns>最大编号</returns>
        public string GetMaxId()
        {
            return dal.GetMaxId();
        }
                /// <summary>
        /// 新闻信息 修改是否热点
        /// </summary>
        /// <param name="newId">新闻编号</param>
        /// <param name="isHot">是否热点</param>
        /// <returns>是否执行成功</returns>
    }
}
